class Solution:
    # @param s, a string
    # @return an integer
    def titleToNumber(self, s):
        ans = 0
        for e in s:
        	print(ans)
            ans = ans * 26 + ord(e) - ord('A')+1
            print(e)
        return ans
x = Solution()
print(x.titleToNumber("AAA"))
print(ord("a"))
